import { checkout } from '@/api/manage/account'

import base from '@/app/model'

// 继承总模型
const model = new base;

model.get = () => {
  return new Promise((resolve, jeject) => {
    checkout().then(res => {
      model.setList(res)
      resolve(res)
    }).catch(res => {
      jeject(res)
    })
  })
}

// 筛选收银台
model.find = id => {
  return model.getList().find(item => item.id == id)
}

export default model